
<!DOCTYPE html>

<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

    <title>Running Leo &#8212; Leo 6.7.2 documentation</title>
    <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="_static/classic.css" />
    <link rel="stylesheet" type="text/css" href="_static/custom.css" />
    
    <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
    <script src="_static/jquery.js"></script>
    <script src="_static/underscore.js"></script>
    <script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
    <script src="_static/doctools.js"></script>
    <script src="_static/sphinx_highlight.js"></script>
    
    <script src="_static/sidebar.js"></script>
    
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Leo’s Tutorials" href="tutorial.html" />
    <link rel="prev" title="Installing Leo" href="installing.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="tutorial.html" title="Leo’s Tutorials"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="installing.html" title="Installing Leo"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="leo_toc.html">Leo 6.7.2 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="getting-started.html" accesskey="U">Downloading, Installing &amp; Running Leo</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">Running Leo</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="running-leo">
<h1>Running Leo<a class="headerlink" href="#running-leo" title="Permalink to this heading">¶</a></h1>
<p id="index-0">This chapter tells how to run Leo and discusses Leo’s command-line options.</p>
<div class="contents local topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#id1" id="id2">Running Leo</a></p>
<ul>
<li><p><a class="reference internal" href="#running-leo-the-first-time" id="id3">Running Leo the first time</a></p></li>
<li><p><a class="reference internal" href="#running-leo-in-batch-mode" id="id4">Running Leo in batch mode</a></p></li>
<li><p><a class="reference internal" href="#running-leo-from-a-console-window" id="id5">Running Leo from a console window</a></p></li>
<li><p><a class="reference internal" href="#running-leo-after-pip-install-leo" id="id6">Running Leo after pip install leo</a></p></li>
<li><p><a class="reference internal" href="#the-leo-directory" id="id7">The .leo directory</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#leo-s-command-line-options" id="id8">Leo’s command-line options</a></p></li>
<li><p><a class="reference internal" href="#leo-s-workbook-file" id="id9">Leo’s workbook file</a></p></li>
<li><p><a class="reference internal" href="#using-sessions" id="id10">Using sessions</a></p></li>
</ul>
</div>
<section id="id1">
<h2><a class="toc-backref" href="#id2">Running Leo</a><a class="headerlink" href="#id1" title="Permalink to this heading">¶</a></h2>
<p>You can run Leo from a Python interpreter as follows:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">leo</span>
<span class="n">leo</span><span class="o">.</span><span class="n">run</span><span class="p">()</span> <span class="c1"># runs Leo, opening a new outline or,</span>
<span class="n">leo</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="n">fileName</span><span class="o">=</span><span class="n">aFileName</span><span class="p">)</span> <span class="c1"># runs Leo, opening the given file name.</span>
</pre></div>
</div>
<p>Another way to run Leo is as follows:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">&lt;</span><span class="n">path</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">launchLeo</span><span class="o">.</span><span class="n">py</span><span class="o">&gt;</span>
<span class="n">python</span> <span class="n">launchLeo</span><span class="o">.</span><span class="n">py</span> <span class="o">%*</span>
</pre></div>
</div>
<p>Here are some tips that may make running Leo easier:</p>
<p><strong>Linux</strong></p>
<p>The following shell script will allow you to open foo.leo files by typing leo foo:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>#!/bin/sh
python &lt;leopath&gt;launchLeo.py $1
</pre></div>
</div>
<p>where &lt;leopath&gt; is the path to the directory containing the leo directory.</p>
<p><strong>Windows</strong></p>
<p>You can associate Leo with .leo files using a batch file. Put the
following .bat file in c:\Windows:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="n">path</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">python</span><span class="o">&gt;/</span><span class="n">python</span> <span class="o">&lt;</span><span class="n">path</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">leo</span><span class="o">&gt;/</span><span class="n">launchLeo</span><span class="o">.</span><span class="n">py</span> <span class="o">%*</span>
</pre></div>
</div>
<p>Here &lt;path-to-leo&gt; is the path to the directory <em>containing</em> the leo directory,
that is, the directory containing launchLeo.py.</p>
<section id="running-leo-the-first-time">
<h3><a class="toc-backref" href="#id3">Running Leo the first time</a><a class="headerlink" href="#running-leo-the-first-time" title="Permalink to this heading">¶</a></h3>
<p>The first time you start Leo, a dialog will ask you for a unique identifier. If
you are using a source code control system such as git, use your git login name.
Otherwise your initials will do.</p>
<p>Leo stores this identifier in the file .leoID.txt. Leo attempts to create
leoID.txt in the .leo sub-directory of your home directory, then in Leo’s config
directory, and finally in Leo’s core directory. You can change this identifier
at any time by editing .leoID.txt.</p>
</section>
<section id="running-leo-in-batch-mode">
<h3><a class="toc-backref" href="#id4">Running Leo in batch mode</a><a class="headerlink" href="#running-leo-in-batch-mode" title="Permalink to this heading">¶</a></h3>
<p>On startup, Leo looks for two arguments of the form:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">--</span><span class="n">script</span> <span class="n">scriptFile</span>
</pre></div>
</div>
<p>If found, Leo enters batch mode. In batch mode Leo does not show any windows.
Leo assumes the scriptFile contains a Python script and executes the contents of
that file using Leo’s Execute Script command. By default, Leo sends all
output to the console window. Scripts in the scriptFile may disable or enable
this output by calling app.log.disable or app.log.enable</p>
<p>Scripts in the scriptFile may execute any of Leo’s commands except the Edit Body
and Edit Headline commands. Those commands require interaction with the user.
For example, the following batch script reads a Leo file and prints all the
headlines in that file:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">path</span> <span class="o">=</span> <span class="sa">r</span><span class="s2">&quot;&lt;path-to-folder-containing-the-leo-folder&gt;</span><span class="se">\\</span><span class="s2">leo</span><span class="se">\\</span><span class="s2">test</span><span class="se">\\</span><span class="s2">test.leo&quot;</span>

<span class="n">g</span><span class="o">.</span><span class="n">app</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">disable</span><span class="p">()</span> <span class="c1"># disable reading messages while opening the file</span>
<span class="n">flag</span><span class="p">,</span><span class="n">newFrame</span> <span class="o">=</span> <span class="n">g</span><span class="o">.</span><span class="n">openWithFileName</span><span class="p">(</span><span class="n">path</span><span class="p">,</span><span class="kc">None</span><span class="p">)</span>
<span class="n">g</span><span class="o">.</span><span class="n">app</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">enable</span><span class="p">()</span> <span class="c1"># re-enable the log.</span>

<span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">newFrame</span><span class="o">.</span><span class="n">c</span><span class="o">.</span><span class="n">all_positions</span><span class="p">():</span>
    <span class="n">g</span><span class="o">.</span><span class="n">es</span><span class="p">(</span><span class="n">g</span><span class="o">.</span><span class="n">toEncodedString</span><span class="p">(</span><span class="n">p</span><span class="o">.</span><span class="n">h</span><span class="p">,</span><span class="s2">&quot;utf-8&quot;</span><span class="p">))</span>
</pre></div>
</div>
</section>
<section id="running-leo-from-a-console-window">
<h3><a class="toc-backref" href="#id5">Running Leo from a console window</a><a class="headerlink" href="#running-leo-from-a-console-window" title="Permalink to this heading">¶</a></h3>
<p>Leo sends more detailed error messages to stderr,
the output stream that goes to the console window. In Linux and MacOS
environments, python programs normally execute with the console window visible.</p>
<p>On Windows, you can run Leo with the console window visible by <a class="reference external" href="installing.html#creating-windows-file-associations">associating .leo files with python.exe</a> <em>not</em> pythonw.exe.</p>
</section>
<section id="running-leo-after-pip-install-leo">
<h3><a class="toc-backref" href="#id6">Running Leo after pip install leo</a><a class="headerlink" href="#running-leo-after-pip-install-leo" title="Permalink to this heading">¶</a></h3>
<p>After running <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">leo</span></code> from a console type:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>``leo`` - start Leo in normal graphical mode (qt)
``leo-c``, ``leo-console`` - start Leo in console (curses) mode
``leo-m``, ``leo-messages`` [Windows only] - start Leo in normal (qt) mode, and echo log messages to the starting shell
</pre></div>
</div>
<p>The launchers are installed in <code class="docutils literal notranslate"><span class="pre">PYTHONHOME/Scripts</span></code>.</p>
<p>If for some reason the launchers fail run Leo directly with:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">leo</span><span class="o">-</span><span class="n">editor</span><span class="o">/</span><span class="n">launchLeo</span><span class="o">.</span><span class="n">py</span>
</pre></div>
</div>
</section>
<section id="the-leo-directory">
<h3><a class="toc-backref" href="#id7">The .leo directory</a><a class="headerlink" href="#the-leo-directory" title="Permalink to this heading">¶</a></h3>
<p>Leo uses os.expanduser(‘~’) to determine the HOME directory if no HOME environment variable exists.</p>
<p>Leo puts several files in your HOME/.leo directory: .leoID.txt, .leoRecentFiles.txt, and myLeoSettings.leo.</p>
</section>
</section>
<section id="leo-s-command-line-options">
<h2><a class="toc-backref" href="#id8">Leo’s command-line options</a><a class="headerlink" href="#leo-s-command-line-options" title="Permalink to this heading">¶</a></h2>
<p>Leo supports the following command-line options. As usual, you can see the list by typing the following in a console window:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">leo</span> <span class="o">-</span><span class="n">h</span>
</pre></div>
</div>
<p>or:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">leo</span> <span class="o">--</span><span class="n">help</span>
</pre></div>
</div>
<p>You will get something like the following:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">usage</span><span class="p">:</span> <span class="n">launchLeo</span><span class="o">.</span><span class="n">py</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">b</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">diff</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">fail</span><span class="o">-</span><span class="n">fast</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">fullscreen</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">ipython</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">gui</span> <span class="n">GUI</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">listen</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">log</span><span class="p">]</span>
                    <span class="p">[</span><span class="o">--</span><span class="n">load</span><span class="o">-</span><span class="nb">type</span> <span class="n">TYPE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">maximized</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">minimized</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">plugins</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">splash</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">quit</span><span class="p">]</span>
                    <span class="p">[</span><span class="o">--</span><span class="n">screen</span><span class="o">-</span><span class="n">shot</span> <span class="n">PATH</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">script</span> <span class="n">PATH</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">script</span><span class="o">-</span><span class="n">window</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">select</span> <span class="n">ID</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">silent</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">theme</span> <span class="n">NAME</span><span class="p">]</span>
                    <span class="p">[</span><span class="o">--</span><span class="n">trace</span> <span class="n">TRACE</span><span class="o">-</span><span class="n">KEY</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">trace</span><span class="o">-</span><span class="n">binding</span> <span class="n">KEY</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">trace</span><span class="o">-</span><span class="n">setting</span> <span class="n">NAME</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">window</span><span class="o">-</span><span class="n">size</span> <span class="n">SIZE</span><span class="p">]</span>
                    <span class="p">[</span><span class="o">--</span><span class="n">window</span><span class="o">-</span><span class="n">spot</span> <span class="n">SPOT</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">v</span><span class="p">]</span>
                    <span class="p">[</span><span class="n">FILES</span> <span class="o">...</span><span class="p">]</span>

<span class="n">usage</span><span class="p">:</span> <span class="n">launchLeo</span><span class="o">.</span><span class="n">py</span> <span class="p">[</span><span class="n">options</span><span class="p">]</span> <span class="n">file1</span><span class="p">,</span> <span class="n">file2</span><span class="p">,</span> <span class="o">...</span>

<span class="n">positional</span> <span class="n">arguments</span><span class="p">:</span>
  <span class="n">FILES</span>                 <span class="nb">list</span> <span class="n">of</span> <span class="n">files</span>

<span class="n">options</span><span class="p">:</span>
  <span class="o">-</span><span class="n">h</span><span class="p">,</span> <span class="o">--</span><span class="n">help</span>            <span class="n">show</span> <span class="n">this</span> <span class="n">help</span> <span class="n">message</span> <span class="ow">and</span> <span class="n">exit</span>
  <span class="o">-</span><span class="n">b</span><span class="p">,</span> <span class="o">--</span><span class="n">black</span><span class="o">-</span><span class="n">sentinels</span>
                        <span class="n">write</span> <span class="n">black</span><span class="o">-</span><span class="n">compatible</span> <span class="n">sentinel</span> <span class="n">comments</span>
  <span class="o">--</span><span class="n">diff</span>                <span class="n">use</span> <span class="n">Leo</span> <span class="k">as</span> <span class="n">an</span> <span class="n">external</span> <span class="n">git</span> <span class="n">diff</span>
  <span class="o">--</span><span class="n">fail</span><span class="o">-</span><span class="n">fast</span>           <span class="n">stop</span> <span class="n">unit</span> <span class="n">tests</span> <span class="n">after</span> <span class="n">the</span> <span class="n">first</span> <span class="n">failure</span>
  <span class="o">--</span><span class="n">fullscreen</span>          <span class="n">start</span> <span class="n">fullscreen</span>
  <span class="o">--</span><span class="n">ipython</span>             <span class="n">enable</span> <span class="n">ipython</span> <span class="n">support</span>
  <span class="o">--</span><span class="n">gui</span> <span class="n">GUI</span>             <span class="n">gui</span> <span class="n">to</span> <span class="n">use</span> <span class="p">(</span><span class="n">qt</span><span class="o">/</span><span class="n">console</span><span class="o">/</span><span class="n">null</span><span class="p">)</span>
  <span class="o">--</span><span class="n">listen</span><span class="o">-</span><span class="n">to</span><span class="o">-</span><span class="n">log</span>       <span class="n">start</span> <span class="n">log_listener</span><span class="o">.</span><span class="n">py</span> <span class="n">on</span> <span class="n">startup</span>
  <span class="o">--</span><span class="n">load</span><span class="o">-</span><span class="nb">type</span> <span class="n">TYPE</span>      <span class="o">@&lt;</span><span class="n">file</span><span class="o">&gt;</span> <span class="nb">type</span> <span class="k">for</span> <span class="n">non</span><span class="o">-</span><span class="n">outlines</span>
  <span class="o">--</span><span class="n">maximized</span>           <span class="n">start</span> <span class="n">maximized</span>
  <span class="o">--</span><span class="n">minimized</span>           <span class="n">start</span> <span class="n">minimized</span>
  <span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">plugins</span>          <span class="n">disable</span> <span class="nb">all</span> <span class="n">plugins</span>
  <span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">splash</span>           <span class="n">disable</span> <span class="n">the</span> <span class="n">splash</span> <span class="n">screen</span>
  <span class="o">--</span><span class="n">quit</span>                <span class="n">quit</span> <span class="n">immediately</span> <span class="n">after</span> <span class="n">loading</span>
  <span class="o">--</span><span class="n">screen</span><span class="o">-</span><span class="n">shot</span> <span class="n">PATH</span>    <span class="n">take</span> <span class="n">a</span> <span class="n">screen</span> <span class="n">shot</span> <span class="ow">and</span> <span class="n">then</span> <span class="n">exit</span>
  <span class="o">--</span><span class="n">script</span> <span class="n">PATH</span>         <span class="n">execute</span> <span class="n">a</span> <span class="n">script</span> <span class="ow">and</span> <span class="n">then</span> <span class="n">exit</span>
  <span class="o">--</span><span class="n">script</span><span class="o">-</span><span class="n">window</span>       <span class="n">execute</span> <span class="n">script</span> <span class="n">using</span> <span class="n">default</span> <span class="n">gui</span>
  <span class="o">--</span><span class="n">select</span> <span class="n">ID</span>           <span class="n">headline</span> <span class="ow">or</span> <span class="n">gnx</span> <span class="n">of</span> <span class="n">node</span> <span class="n">to</span> <span class="n">select</span>
  <span class="o">--</span><span class="n">silent</span>              <span class="n">disable</span> <span class="nb">all</span> <span class="n">log</span> <span class="n">messages</span>
  <span class="o">--</span><span class="n">theme</span> <span class="n">NAME</span>          <span class="n">use</span> <span class="n">the</span> <span class="n">named</span> <span class="n">theme</span> <span class="n">file</span>
  <span class="o">--</span><span class="n">trace</span> <span class="n">TRACE</span><span class="o">-</span><span class="n">KEY</span>     <span class="n">add</span> <span class="n">one</span> <span class="ow">or</span> <span class="n">more</span> <span class="n">strings</span> <span class="n">to</span> <span class="n">g</span><span class="o">.</span><span class="n">app</span><span class="o">.</span><span class="n">debug</span><span class="o">.</span> <span class="n">One</span> <span class="ow">or</span> <span class="n">more</span> <span class="n">of</span><span class="o">...</span>
                        <span class="n">abbrev</span><span class="p">,</span> <span class="n">beauty</span><span class="p">,</span> <span class="n">cache</span><span class="p">,</span> <span class="n">coloring</span><span class="p">,</span> <span class="n">drawing</span><span class="p">,</span> <span class="n">events</span><span class="p">,</span> <span class="n">focus</span><span class="p">,</span> <span class="n">git</span><span class="p">,</span> <span class="n">gnx</span>
                        <span class="n">importers</span><span class="p">,</span> <span class="n">ipython</span><span class="p">,</span> <span class="n">keys</span><span class="p">,</span> <span class="n">layouts</span><span class="p">,</span> <span class="n">plugins</span><span class="p">,</span> <span class="n">save</span><span class="p">,</span> <span class="n">select</span><span class="p">,</span> <span class="n">sections</span><span class="p">,</span>
                        <span class="n">shutdown</span><span class="p">,</span> <span class="n">size</span><span class="p">,</span> <span class="n">speed</span><span class="p">,</span> <span class="n">startup</span><span class="p">,</span> <span class="n">themes</span><span class="p">,</span> <span class="n">undo</span><span class="p">,</span> <span class="n">verbose</span><span class="p">,</span> <span class="n">zoom</span>
  <span class="o">--</span><span class="n">trace</span><span class="o">-</span><span class="n">binding</span> <span class="n">KEY</span>   <span class="n">trace</span> <span class="n">commands</span> <span class="n">bound</span> <span class="n">to</span> <span class="n">a</span> <span class="n">key</span>
  <span class="o">--</span><span class="n">trace</span><span class="o">-</span><span class="n">setting</span> <span class="n">NAME</span>  <span class="n">trace</span> <span class="n">where</span> <span class="n">named</span> <span class="n">setting</span> <span class="ow">is</span> <span class="nb">set</span>
  <span class="o">--</span><span class="n">window</span><span class="o">-</span><span class="n">size</span> <span class="n">SIZE</span>    <span class="n">initial</span> <span class="n">window</span> <span class="n">size</span> <span class="p">(</span><span class="n">height</span> <span class="n">x</span> <span class="n">width</span><span class="p">)</span>
  <span class="o">--</span><span class="n">window</span><span class="o">-</span><span class="n">spot</span> <span class="n">SPOT</span>    <span class="n">initial</span> <span class="n">window</span> <span class="n">position</span> <span class="p">(</span><span class="n">top</span> <span class="n">x</span> <span class="n">left</span><span class="p">)</span>
  <span class="o">-</span><span class="n">v</span><span class="p">,</span> <span class="o">--</span><span class="n">version</span>         <span class="nb">print</span> <span class="n">version</span> <span class="n">number</span> <span class="ow">and</span> <span class="n">exit</span>
</pre></div>
</div>
<p><strong>Important</strong></p>
<p>Use one of the following command-line arguments to start Leo in a web browser:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>leo --gui=browser
leo --gui=browser-firefox-browser​
</pre></div>
</div>
<p>For details, see <a class="reference external" href="https://github.com/leo-editor/leo-editor/issues/1005">https://github.com/leo-editor/leo-editor/issues/1005</a>.</p>
</section>
<section id="leo-s-workbook-file">
<h2><a class="toc-backref" href="#id9">Leo’s workbook file</a><a class="headerlink" href="#leo-s-workbook-file" title="Permalink to this heading">¶</a></h2>
<p>If you give no file arguments on the command line Leo will open <code class="docutils literal notranslate"><span class="pre">~/.leo/workbook.leo</span></code>.  Initially, this file contains Leo’s cheat sheet and an example from the rst3 tutorial.</p>
</section>
<section id="using-sessions">
<h2><a class="toc-backref" href="#id10">Using sessions</a><a class="headerlink" href="#using-sessions" title="Permalink to this heading">¶</a></h2>
<p>A <strong>session</strong> specifies a list of .leo files that Leo opens automatically when Leo first starts.  Leo will reload the last session provided that command-line arguments <em>don’t</em> contain any file names.</p>
<p>Leo stores session state in <code class="docutils literal notranslate"><span class="pre">~/.leo/leo.session</span></code>. Session state consists of the list of open files and the selected node in each file.</p>
</section>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="leo_toc.html">
              <img class="logo" src="_static/LeoLogo.svg" alt="Logo"/>
            </a></p>
  <div>
    <h4>Previous topic</h4>
    <p class="topless"><a href="installing.html"
                          title="previous chapter">Installing Leo</a></p>
  </div>
  <div>
    <h4>Next topic</h4>
    <p class="topless"><a href="tutorial.html"
                          title="next chapter">Leo’s Tutorials</a></p>
  </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
        </div>
<div id="sidebarbutton" title="Collapse sidebar">
<span>«</span>
</div>

      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="tutorial.html" title="Leo’s Tutorials"
             >next</a> |</li>
        <li class="right" >
          <a href="installing.html" title="Installing Leo"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="leo_toc.html">Leo 6.7.2 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="getting-started.html" >Downloading, Installing &amp; Running Leo</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">Running Leo</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 1997-2023, Edward K. Ream.
      Last updated on February 28, 2023.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
    </div>
  </body>
</html>